<html>
    <head>
        <style>
            body {
                font: 300% "阿里巴巴普惠体";
                background-color: gray;
            }
            div {
                margin-left: 60%;
                margin-right: 10%;
                margin-top: 10%;
                margin-bottom: 20%;
                gap: 20px;
            }
			subicon {
				width: 100px;
				height: 100px;
				background-image: "/pkg/ant.resources/textures/irbtn_sub.atlas";
				background-size: contain;
			}
			icon {
				width: 100px;
				height: 100px;
				background-image: "/pkg/ant.resources/textures/irbtn_normal.texture";
				background-size: contain;
			}
            button {
                padding: 0 20px;
                text-align: center;
                text-decoration: none;
                border-radius: 10px;
                border: 1px white;
                background-color: black;
                background-size: contain;
                color: white;
                transform: scale(1.0);
            }
            button:active {
                transform: scale(1.1);
            }
        </style>
        <script type="text/x-lua" >
            local model = window.createModel {
                show = false,
                label = "新游戏"
            }
            function model.new(event)
				assert(event.current.id == "new")
				assert(document.getElementById "new" == event.current)
                window.callMessage("click", "new")
            end
            function model.load(event)
                window.callMessage("click", "load")
                model.label = "继续游戏"
            end
            function model.setting(event)
                window.callMessage("click", "setting")
                model.show = not model.show
            end
            function model.exit()
                window.callMessage("click", "exit")
            end
        </script>
    </head>
    <body>
        <div>
			<icon/>
			<subicon/>
            <button id = "new" data-event-click="new(ev)">{{label}}</button>
            <button data-event-click="load(ev)">载入游戏</button>
            <button data-event-click="setting(ev)">设置</button>
            <button data-if="show">隐藏菜单</button>
            <button data-event-click="exit(ev)">退出</button>
        </div>
    </body>
</html>
